package com.godz.getter.service.Impl;

import com.godz.getter.mapper.GoodsMapper;
import com.godz.getter.pojo.Goods;
import com.godz.getter.service.GoodsService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    //service 调用 Mapper
    private final GoodsMapper goodsMapper;

    public GoodsServiceImpl(GoodsMapper goodsMapper) {
        this.goodsMapper = goodsMapper;
    }

    @Override
    public List<Goods> queryAllGoods() {
        return goodsMapper.queryAllGoods();//自己定义的查询方法
    }
}
